#ifndef	__DEMO_ACTOR_H__
#define	__DEMO_ACTOR_H__

#include"DEMOSprite.h"
#include"DEMORenderComponentManger.h"

extern class DEMORenderComponentManger;

class DEMORenderComponent
{
protected:
	bool			_bIsHide;
	bool			_bIsActive;

	DEMOSprite		*_spr;
	
	int				_rframeIdx;
	int				_rx,_ry;
	float			_rrot,_rscale;
	DWORD			_rcol;
	bool			_brtrans;
public:
	DEMORenderComponent();
	~DEMORenderComponent();

	void initRes(char* texName,char* dataName);
	void destroyRes();

	void setRenderParam(int fidx,int x,int y,float rot,float scale,DWORD col,bool btrans);

	void toggleAcitve(bool bActive)
	{
		_bIsActive = bActive;
	}

	void toggleHidden(bool bHide)
	{
		_bIsHide = bHide;
	}

	bool isActive()
	{
		return _bIsActive;
	}

	bool isHidden()
	{
		return _bIsHide;
	}

	bool tick(float deltaTime)
	{
		return false;	
	}

	bool render();
	//void doHeartBeat();
};

#endif	//__DEMO_ACTOR_H__